﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Admin;
using System.Net;

public partial class Index : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        AuthHelper.SessionCheck();

        try
        {
            //获取服务器IP
            string name = Dns.GetHostName();
            IPHostEntry myip = Dns.GetHostByName(name);
            foreach (IPAddress ip in myip.AddressList)
            {
                this.LabIp.Text = ip.ToString();
            }

            //获取名称
            string pcname = Dns.GetHostName();
            this.LabName.Text = pcname.ToString();
            //iis
            this.LabIis.Text = Request.ServerVariables["SERVER_SOFTWARE"];
            //时间
            this.LabTime.Text = DateTime.Now.ToString();
            //路径
            this.LabPatch.Text = Server.MapPath(Request.ServerVariables["SCRIPT_NAME"]);
            //端口
            this.Labdk.Text = Request.ServerVariables["SERVER_PORT"];
            //系统
            this.LabWin.Text = Environment.OSVersion.Platform.ToString() + " " + Environment.OSVersion.Version.ToString();
            //超时
            this.LabSe.Text = Server.ScriptTimeout.ToString();
        }
        catch (Exception ex)
        {
        }
    }
}